// Author	: damphat@gmail.com
// Created	: 01/12/2008

#define REQUIRE_EXCEPTION(code) try { code; assert(false); } catch (Exception&) { }

//#define assert(cond) if(!(cond)) { __asm { int 3 }; };

#define _CRT_SECURE_NO_DEPRECATE

#include <assert.h>
#include "vn/Debug.h"
#include "tests/NetTest.h"
#include "tests/IOTest.h"
#include "tests/SystemTest.h"
#include "tests/CollectionTest.h"

#ifdef _MSC_VER
#	include <crtdbg.h>

	void ForceLeakMemoryDetection() {
		int tmpDbgFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
		tmpDbgFlag |= _CRTDBG_DELAY_FREE_MEM_DF;
		tmpDbgFlag |= _CRTDBG_LEAK_CHECK_DF;
		_CrtSetDbgFlag(tmpDbgFlag);
	}

#endif //_MSC_VER


// An idea: newest module will be place at first line.

int main() {

#ifdef _MSC_VER
	ForceLeakMemoryDetection();
#endif

	{_test_func_;
		 CollectionTest();
		 SystemTest();
		 NetTest();
		 IOTest();
	}

	Console::ReadKey();
	return 0;
}

